<?php
/**
 * Created by PhpStorm.
 * User: LENOVO
 * Date: 2018/7/15
 * Time: 13:47
 */

namespace app\simple\controller;


use think\Request;

class GetRouteparams
{
    /*1*/
//    public function getParams($id,$name){
//        echo $id;
//        echo '|';
//        echo $name;
//    }


//    public function getParams(){
//        $request= Request::instance();
//        $id=$request->param('id');
//        $name = $request->param('name');
//        echo $id;
//        echo '|';
//        echo $name;
//    }

//    public function getParams()
//    {
//        $request = Request::instance();
//
////        $all = $request->get();
////        var_dump($all);
//
////        $all = $request->route();
////        var_dump($all);
//
////        $all = $request->post();
////        var_dump($all);
//    }

//    public function getParams(){
//       $all =  input('param.age');
//       //var_dump($all);
//        echo $all;
//    }

    /*依赖注入-*/
    public function getParams(Request $request){
       $all = $request->param();
       var_dump($all);
    }
}